package com.awifi.com.thread.anonymous;

/**
 * @description: 匿名内部类线程函数
 * @author: marin
 * @time: 2020/6/28 17:22
 */
public class AnnoRunable {
    public static void main(String [] args){
        new Thread(){
            @Override
            public void run(){
                for (int i = 0;i< 20;i++) {
                    System.out.println("helloworld"+i);
                }
            }
        }.start();
        Runnable r = new Runnable() {
            @Override
            public void run() {
                for (int i = 0;i< 20;i++) {
                    System.out.println("hello"+i);
                }
            }
        };
        Thread thread = new Thread(r);
        thread.start();
    }
}
